

/*
This is a UI file (.ui.qml) that is intended to be edited in Qt Design Studio only.
It is supposed to be strictly declarative and only uses a subset of QML. If you edit
this file manually, you might introduce QML code that is not supported by Qt Design Studio.
Check out https://doc.qt.io/qtcreator/creator-quick-ui-forms.html for details on .ui.qml files.
*/
import QtQuick 2.15
import QtQuick.Controls 2.15

Button {
    id: control
    width: 200
    height: 60

    leftPadding: 4
    rightPadding: 4

    text: ""
    display: AbstractButton.TextOnly

    background: buttonBackground
    Rectangle {
        id: buttonBackground
        color: "#00000000"
        implicitWidth: 100
        implicitHeight: 40
        opacity: enabled ? 1 : 0.3
        radius: 5
        border.color: "#047eff"
        border.width: 0

        Image {
            id: image
            x: 5
            y: 5
            anchors.fill: parent
            source: "images/suto_logo_60.png"
            anchors.rightMargin: 5
            anchors.leftMargin: 5
            anchors.bottomMargin: 5
            anchors.topMargin: 5
            fillMode: Image.PreserveAspectFit
        }
    }

    states: [
        State {
            name: "normal"
            when: !control.down

            PropertyChanges {
                target: buttonBackground
                color: "#00000000"
                border.color: "#047eff"
            }
        },
        State {
            name: "down"
            when: control.down

            PropertyChanges {
                target: buttonBackground
                width: 200
                color: "#ffe000"
                border.color: "#00000000"
                transformOrigin: Item.Center
            }

            PropertyChanges {
                target: image
                verticalAlignment: Image.AlignVCenter
                source: "images/suto_logow_60.png"
            }

            PropertyChanges {
                target: control
                width: 200
            }
        }
    ]
}

/*##^##
Designer {
    D{i:0;height:60;width:200}
}
##^##*/

